package com.czxy.controller;

import com.czxy.pojo.ESData;
import com.czxy.pojo.group.BaseResult;
import com.czxy.service.ESDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Liuyunqin 17674029449@163.com
 * @date 2018/12/25 8:10
 */
@RestController
@RequestMapping
public class ESDataController {

    @Autowired
    private ESDataService esDataService;

   @GetMapping("esData")
    public ResponseEntity<Object> findESData(){
       List<ESData> all = esDataService.findAll();
        return ResponseEntity.ok(all);
    }
}
